//
//  JYJBigSortCollectionViewCell.m
//  HappyListen
//
//  Created by 冀永金 on 16/8/31.
//  Copyright © 2016年 冀永金. All rights reserved.
//

#import "JYJBigSortCollectionViewCell.h"
#import "UIImageView+WebCache.h"
#import "JYJSortModel.h"
#import "JYJTAMacro.h"
@interface  JYJBigSortCollectionViewCell ()
@property (nonatomic, strong) UIImageView *image;
@end
@implementation JYJBigSortCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        self.image = [[UIImageView alloc]init];
        [self.contentView addSubview:_image];
       
    }
    return self;
}
- (void)layoutSubviews {
    [super layoutSubviews];
    self.image.frame = self.contentView.bounds;
    self.image.layer.cornerRadius = self.contentView.bounds.size.width / 2;
    self.image.clipsToBounds = YES;
}
- (void)setSortModel:(JYJSortModel *)sortModel {
    _sortModel = sortModel;
    [self.image sd_setImageWithURL:[NSURL URLWithString:sortModel.channel_img1] placeholderImage:PLACEHOLDERIMAGE];
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
